exports.install = function(Vue, options) {
  //hostUrl
  Vue.prototype.baseUrl = function () {
    return "http://app.wodinghua.com/api"
  }
  //是否登录
  Vue.prototype.isLogin = function() {
    var userName = JSON.parse(this.getItemStorange("userInfo"));
    console.log(userName);
    if(userName === null || userName.loginSta === false) {
      this.$router.push('/login')
    }
  }
  Vue.prototype.IndicatorOpen = function(options) {
    if (options === undefined) {
      this.Indicator.open();
    } else {
      this.Indicator.open(options);
    }
  },
  Vue.prototype.axiosReq = function(ax) {
    return this.$ajax.create({
        timeout: 20000
    });
  },
  Vue.prototype.setItemStorange = function (name, data) {
    window.localStorage.setItem(name, data);
  },
  Vue.prototype.getItemStorange = function (name) {
    return window.localStorage.getItem(name);
  },
  Vue.prototype.clearItemStorange = function (name) {
    window.localStorage.clear(name);
  }
};